package com.cliff.joinus.dataobject;

public class VideoItem extends MediaItem {
	public String resolution = null;
	public long duration = 0;
	public String displayName = null;
	public String title = null;
	public String artist = null;
	
	public String getDuration() {
		if (0 == duration)
			return "--:--";
		long playTime = duration / 1000;
		return String.format("%d:%02d", (playTime/60), (playTime%60)); 				
	}
	
	public String getDisplayName() {		
		if (null != displayName)
			return displayName;

		if (null != title)
			return title;
		
		return "";
	}
	
	public String getArtist() {
		return (null == artist)?"":artist;
	}
	
}
